package com.dongdong.api;


import com.dongdong.model.TAdmin;
import com.dongdong.model.TbItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("dongdong-goods-services")
public interface ItemApi {   //openfeign的远程调用 映射对应方法

    @GetMapping("/item/selectBySkuId")
    public TbItem selectBySkuId(@RequestParam Long skuId);

    //扣库存
    @PostMapping("/item/stockCount")
    public void stockCount(@RequestBody List<TbItem> items);

}
